#include "card.h"


suit card::cardSuit(){

	return suitOfCard;

}

rank card::cardRank(){

	return rankOfCard;
}

int card::imgID(){

	return 4*rankOfCard+suitOfCard; 
}


ostream& operator << (ostream& os,const card& ob){

	std::cout<<rankString[ob.rankOfCard]<<" of "<<suitString[ob.suitOfCard];
	return os;
}

bool cardSortPre(const card& left,const card& right){

	return left.rankOfCard > right.rankOfCard;
}

bool cardSort(const card& left,const card& right){

	if (left.countOfCard==right.countOfCard){
		return left.rankOfCard > right.rankOfCard;
	}
	else{
		return left.countOfCard > right.countOfCard;
	}
}

bool cardComp(const card& left,const card& right){

	return left.rankOfCard==right.rankOfCard;
}

bool cardCompSuit(const card& left,const card& right){

	return left.suitOfCard==right.suitOfCard;
}